Skip to content

fix: don't treat 429 as success in sendToRelay#3413

Open
SirBrenton wants to merge 1 commit into
jo-inc:masterfrom
SirBrenton:fix/reporter-429-silent-success
Open

fix: don't treat 429 as success in sendToRelay#3413
SirBrenton wants to merge 1 commit into
jo-inc:masterfrom
SirBrenton:fix/reporter-429-silent-success

Conversation

@SirBrenton
Copy link
Copy Markdown

What

sendToRelay in lib/reporter.js was returning true when the relay responded with 429, treating a rate-limited request as accepted.

// Before
return resp.ok || resp.status === 429; // rate-limited is fine, not an error

// After
return resp.ok; // 429 returns false — let callers decide whether to retry

Why this matters

A 429 means the relay did not accept the report. Returning true silently dropped crash reports under sustained rate limiting — giving callers false confidence that reporting succeeded when data was lost.

Fix shape

Return false on 429. Preserves the never-throws contract. No blocking retry logic added. Callers decide whether to retry.

A 429 from the relay means the report was rate-limited and not accepted.
Returning true silently dropped crash reports under sustained rate limiting,
giving callers false confidence that reporting succeeded.

Return false on 429 so callers can decide whether to retry.
Honors the never-throws contract — no blocking retry logic added.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant